<template>
  <IFexHeaderMain class="user_center_container">
    <template #header>
      <IHeader>我是订单</IHeader>
    </template>
    <view class="user_center_main whov">
      <IDialog :dialogData="dialogData">
        <view>我是弹框</view>
      </IDialog>
      <IDialog :dialogData="dialogData1">
      </IDialog>
      <IDialog :dialogData="dialogData2">
        <view>22222222222222</view>
      </IDialog>
    </view>
    <template #footer><ITabBar :index="2" /></template>
  </IFexHeaderMain>
</template>

<script setup lang="ts" name="userInfo">
import IDialog from '@/components/container/IDialog.vue';
import ITabBar from '@/components/container/ITabBar.vue';
import IFexHeaderMain from '@/components/container/IFexHeaderMain.vue';
import IHeader from '@/components/container/IHeader.vue';
import { IDialogTemplate } from '#/container/IDialog';
import { onMounted, ref } from 'vue';
// import { getLocationPosition } from '@/utils/loactionPosition';
// onMounted(async () => {
//   // const result: any = await getLocationPosition();
// });
const dialogData = ref<IDialogTemplate>({
  show: false,
  title: '我是提示',
  async confirm(arg0, arg1) {
    await console.log("1222211") 
    dialogData.value.show = false
  },
  close(){
    dialogData.value.show = false
  },
});
const dialogData1 = ref<IDialogTemplate>({
  show: false,
  title: '我是提示1',
  type:'input',
  value:'1111111',
  async confirm(arg0, arg1) {
    await console.log("1222211") 
    dialogData1.value.show = false
  },
});
const dialogData2 = ref<IDialogTemplate>({
  show: false,
  title: '我是提示2',
  type:'message',
  async confirm(arg0, arg1) {
    await console.log("1222211") 
    dialogData1.value.show = false
  },
});
const dialogData3 = ref<IDialogTemplate>({
  show: false,
  title: '我是提示3',
  type:'share',
  async confirm(arg0, arg1) {
    await console.log("1222211") 
    dialogData1.value.show = false
  },
});
onMounted(() => {
    dialogData.value.show = true
    dialogData1.value.show = true
    dialogData2.value.show = true
})
</script>

<style scoped lang="scss"></style>
